
package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Jaguar;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Servo;
import edu.wpi.first.wpilibj.SimpleRobot;


public class RobotTemplate extends SimpleRobot {
    Jaguar jag1; //declare jaguar duh
    Joystick joy1; //same  but joystick double duh
    HopperController hopper; //hopper stuff
    DigitalInput switch1;
    DigitalInput switch2;
    //Servo servo;
    
    public void robotInit(){
        jag1 = new Jaguar(4); //jag in port 
        joy1 = new Joystick(1); //I hate you for not knowing this. Joystick
        hopper = new HopperController(joy1, jag1); //hopper
       // servo = new Servo (8);
    }
    public void autonomous() {
        
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        while(isOperatorControl()&& isEnabled())
        {
           hopper.control();
           //double pos = (joy1.getRawAxis(2) + 1.0) / 2.0;
           //servo.setPosition(pos);
        }
            
    }
    
    /**
     * This function is called once each time the robot enters test mode.
     */
    public void test() {
    
    }
}
